package com.bk.controller.sso;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.bk.service.UserLoginService;
import com.bk.service.sso.SsoLoginService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
/**
 * @author czl 单点登陆
 *      
 */
@RestController
@Slf4j
@Api(value = "ssologin")
public class SsoLoginController {

	@Resource
	private SsoLoginService ssoLoginService;
	
	@ApiOperation(value = "单点登陆", notes = "根据传递的name获得响应，RestFul风格的请求")
	@GetMapping("/ssologin0")
	public String ssoLogin0(@RequestParam("name") String name) {
		return ssoLoginService.hello(name);
	}
	
	@Autowired
	private UserLoginService userLoginService;
	@GetMapping("/ssologin")
	public String ssoLogin(@RequestParam("name") String name) {
		return userLoginService.getHello(name);
	}
}
